package com.thm.tfast.modules.sys.model.dto.resource;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * @author THM
 * @date 2022/10/29
 * @desc 资源修改dto
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class ResourceUpdateDto {
    @ApiModelProperty(value = "资源ID", required = true)
    @NotNull(message = "资源ID不能为空")
    private Long id;

    @ApiModelProperty(value = "资源名称")
    @Size(max = 32, message = "资源名称不能超过32位")
    private String name;

    @ApiModelProperty(value = "资源类型ID")
    private Long categoryId;

    @ApiModelProperty(value = "请求统一前缀")
    @Size(max = 32, message = "请求统一前缀不能超过32位")
    private String prefix;

    @ApiModelProperty(value = "请求路径")
    @Size(max = 128, message = "请求路径不能超过128位")
    private String url;

    @ApiModelProperty(value = "请求方式")
    @Size(max = 10, message = "请求方式不能超过10位")

    private String method;
    @ApiModelProperty(value = "描述")
    @Size(max = 64, message = "描述不能超过64位")
    private String description;

    @ApiModelProperty(value = "类型 1-系统资源 2-业务资源")
    private Integer type;

    @ApiModelProperty(value = "是否需要权限访问 0-不需要  1-需要")
    private Integer hasPermission;

    @ApiModelProperty(value = "权限ID")
    private Integer permissionId;

}
